Solution to that weird u-substitution